#!/usr/bin/env python  
# -*- coding:utf-8 _*-  
""" 
@author:quincyqiang 
@license: Apache Licence 
@file: ensemble.py 
@time: 2020/9/13 12:35 上午
@description:
"""
import pandas as pd


lgb = pd.read_csv('../prediction_result/lgb.csv')
xgb = pd.read_csv('../prediction_result/xgb.csv')
ctb = pd.read_csv('../prediction_result/cat.csv')
sub = lgb.copy()
# sub['score'] = (lgb['score'].rank()**(0.4)*xgb['score'].rank() ** (0.3) * ctb['score'].rank() ** (
#                 0.3)) / 10000
sub['score']=(lgb['score']+xgb['score'])/2
sub['score'] = sub['score'].round(4)
sub.to_csv("result/result.csv", index=False)

